1. Field of the Invention
The present invention relates to a method for processing data to be transmitted and handling checksum calculation results associated with the data and a corresponding apparatus (e.g., communication apparatus).
2. Description of the Related Art
One disadvantage associated with a conventional data processing apparatus (e.g., communication apparatus) is that, during data communication, a processor of the apparatus may be so heavily loaded in performing checksum calculation, the throughput of the apparatus is degraded. As a solution therefor, the hardware is provided to perform checksum calculation in direct memory access (DMA) transfer so as to insert a checksum in a communication frame.
For example, Japanese Patent Application Laid-Open No. 4-352054 discusses a conventional technique for performing checksum calculation using the hardware. According to the conventional technique of Japanese Patent Application Laid-Open No. 4-352054, checksum calculation is performed by the hardware, and a CPU reads and handles its checksum calculation result.
Japanese Patent Application Laid-Open No. 6-78024 (U.S. Pat. No. 5,430,842) discusses a conventional technique for automatically inserting a checksum calculation result into a communication frame by using the hardware. According to a communication interface system of Japanese Patent Application Laid-Open No. 6-78024, after a processor transmits a transfer command of network packet data to a direct memory access unit, the network packet into which a checksum is automatically inserted is sent to a network. The processor adds in advance control information necessary for checksum calculation to the network packet in the form of a checksum header, and transmits the network packet having the checksum header added thereto to a communication interface. Then, the central processing unit (CPU) decodes the checksum header in the communication interface to perform the checksum calculation.
However, according to the conventional technique discussed in Japanese Patent Application Laid-Open No. 4-352054, the CPU has to wait for the complete checksum calculation before issuing a command to output the network packet which is presently handled, thus causing degradation of throughput.
The checksum calculation result is stored in a predetermined position of the communication packet according to the communication protocol. When the conventional technique of Japanese Patent Application Laid-Open No. 4-352054 in which the CPU handles the checksum calculation result, is applied to a system having multiple communication protocols, the processing contents that are processed by the CPU may possibly differ every time the communication frame is sent, which degrades throughput.
According to the conventional technique of Japanese Patent Application Laid-Open No. 6-78024, the processor is always required to recognize the communication protocol of the communication frame in order to implement a series of processes for calculating the checksum and inserting the checksum into the network packet. In addition, it is necessary to notify the hardware of an address where the checksum calculation is inserted in the communication frame. Further, the publication gives no indication about re-transmission procedures, when the communication protocol includes re-transmission.
Therefore, in the system having multiple communication protocols, the processor is always required to change a checksum header which is given to the communication interface (i.e. a processor command) so that a number of processes that the processor performs, increases.
It is assumed herein that the processor configures the network packet in the main storage unit. Thus, the checksum calculation cannot be performed when the communication protocol presently handled by the processor is not identified by a bridge circuit, etc.
In the communication protocol that requires re-transmission of the communication frame, if the same processes as that for the transmission at the first time are to be performed for re-transmission, the checksum calculation needs to be performed again, which causes degradation of throughput.